#ifndef OPTIONSPANEL_H
#define OPTIONSPANEL_H

#include <QWidget>
#include <QGraphicsView>
#include <QGraphicsScene>
#include <QApplication>
#include <QList>
#include <QGraphicsTextItem>

#include "gamebackground.h"
#include "menuitem.h"
#include "gamescene.h"

#define RESOURCE_DIR QApplication::applicationDirPath() + "/../../resources"

class OptionsPanel : public QWidget
{
    Q_OBJECT

public:
    OptionsPanel(QWidget * parent = 0);
    void nextScene();
    void setEnabled(bool enabled);

signals:
    void endScene(GameScene::GameScenes nextScene);
    void resumeScene();

public slots:
    void itemClicked(MenuItem * item);

protected:
    void keyPressEvent(QKeyEvent * key);

private:
    QGraphicsView * optionsView;
    QGraphicsScene * optionsScene;
    GameBackground * background;
    QGraphicsTextItem * title;

    MenuItem * endItem;
    MenuItem * helpItem;
    MenuItem * quitItem;
    MenuItem * resumeItem;
    QList<MenuItem*> menu;
    int menuPosition;

};

#endif // OPTIONSPANEL_H
